We recently moved our SVN (source code versioning system) to a new server (location). Unfortunately we had given direct external links from our design modules in Doors to the SVN path in the source files. Now all these paths are wrong. Is there a way to search and replace all the links to the new path? |
Re: Doors DXL
This will do that for you.
pragma runLim, 0
DB dbMain = null
DBE dbeOld = null
DBE dbeNew = null
string oldString = ""
string newString = ""
Module m = current Module
Buffer b = create
void doApply(DB db)
{
Object o = null
ExternalLink el = null
string elBody = ""
oldString = get(dbeOld)
newString = get(dbeNew)
for o in m do
{
for el in o -> "*" do
{
setempty(b)
b += body(el)
i = contains(b, oldString, 0)
print i "\n"
if (i == 0)
{
elBody = newString b[i + length(oldString):]
}
else if (i > 0)
{
elBody = b[0:i-1] newString b[i + length(oldString):]
}
else
{
continue
}
update(description(el), name(el), direction(el), behaviour(el), elBody, el)
}
}
}
/******************************************************************************
MAIN
******************************************************************************/
dbMain = create(m, "Update External Links", styleFloating)
label(dbMain, "")
dbeOld = field(dbMain, "Old String", oldString, 20, false)
dbeNew = field(dbMain, "New String", newString, 20, false)
ok(dbMain, "OK", doApply)
realize(dbMain)
show(dbMain)
|
Re: Doors DXL Thank you so.... much. Your solution is working.really .it can value add Nikhitha |